Optimal. Leaf size=122 \[ -\frac {2 a^2+b^2}{6 x^3}+\frac {b^2 \cos \left (2 \left (c+d x^3\right )\right )}{6 x^3}+\frac {2}{3} a b d \cos (c) \text {Ci}\left (d x^3\right )+\frac {1}{3} b^2 d \text {Ci}\left (2 d x^3\right ) \sin (2 c)-\frac {2 a b \sin \left (c+d x^3\right )}{3 x^3}-\frac {2}{3} a b d \sin (c) \text {Si}\left (d x^3\right )+\frac {1}{3} b^2 d \cos (2 c) \text {Si}\left (2 d x^3\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps
used = 13, number of rules used = 8, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {3484, 6, 3461,
3378, 3384, 3380, 3383, 3460} \begin {gather*} -\frac {2 a^2+b^2}{6 x^3}+\frac {2}{3} a b d \cos (c) \text {CosIntegral}\left (d x^3\right )-\frac {2}{3} a b d \sin (c) \text {Si}\left (d x^3\right )-\frac {2 a b \sin \left (c+d x^3\right )}{3 x^3}+\frac {1}{3} b^2 d \sin (2 c) \text {CosIntegral}\left (2 d x^3\right )+\frac {1}{3} b^2 d \cos (2 c) \text {Si}\left (2 d x^3\right )+\frac {b^2 \cos \left (2 \left (c+d x^3\right )\right )}{6 x^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 6
Rule 3378
Rule 3380
Rule 3383
Rule 3384
Rule 3460
Rule 3461
Rule 3484
Rubi steps
\begin {align*} \int \frac {\left (a+b \sin \left (c+d x^3\right )\right )^2}{x^4} \, dx &=\int \left (\frac {a^2}{x^4}+\frac {b^2}{2 x^4}-\frac {b^2 \cos \left (2 c+2 d x^3\right )}{2 x^4}+\frac {2 a b \sin \left (c+d x^3\right )}{x^4}\right ) \, dx\\ &=\int \left (\frac {a^2+\frac {b^2}{2}}{x^4}-\frac {b^2 \cos \left (2 c+2 d x^3\right )}{2 x^4}+\frac {2 a b \sin \left (c+d x^3\right )}{x^4}\right ) \, dx\\ &=-\frac {2 a^2+b^2}{6 x^3}+(2 a b) \int \frac {\sin \left (c+d x^3\right )}{x^4} \, dx-\frac {1}{2} b^2 \int \frac {\cos \left (2 c+2 d x^3\right )}{x^4} \, dx\\ &=-\frac {2 a^2+b^2}{6 x^3}+\frac {1}{3} (2 a b) \text {Subst}\left (\int \frac {\sin (c+d x)}{x^2} \, dx,x,x^3\right )-\frac {1}{6} b^2 \text {Subst}\left (\int \frac {\cos (2 c+2 d x)}{x^2} \, dx,x,x^3\right )\\ &=-\frac {2 a^2+b^2}{6 x^3}+\frac {b^2 \cos \left (2 \left (c+d x^3\right )\right )}{6 x^3}-\frac {2 a b \sin \left (c+d x^3\right )}{3 x^3}+\frac {1}{3} (2 a b d) \text {Subst}\left (\int \frac {\cos (c+d x)}{x} \, dx,x,x^3\right )+\frac {1}{3} \left (b^2 d\right ) \text {Subst}\left (\int \frac {\sin (2 c+2 d x)}{x} \, dx,x,x^3\right )\\ &=-\frac {2 a^2+b^2}{6 x^3}+\frac {b^2 \cos \left (2 \left (c+d x^3\right )\right )}{6 x^3}-\frac {2 a b \sin \left (c+d x^3\right )}{3 x^3}+\frac {1}{3} (2 a b d \cos (c)) \text {Subst}\left (\int \frac {\cos (d x)}{x} \, dx,x,x^3\right )+\frac {1}{3} \left (b^2 d \cos (2 c)\right ) \text {Subst}\left (\int \frac {\sin (2 d x)}{x} \, dx,x,x^3\right )-\frac {1}{3} (2 a b d \sin (c)) \text {Subst}\left (\int \frac {\sin (d x)}{x} \, dx,x,x^3\right )+\frac {1}{3} \left (b^2 d \sin (2 c)\right ) \text {Subst}\left (\int \frac {\cos (2 d x)}{x} \, dx,x,x^3\right )\\ &=-\frac {2 a^2+b^2}{6 x^3}+\frac {b^2 \cos \left (2 \left (c+d x^3\right )\right )}{6 x^3}+\frac {2}{3} a b d \cos (c) \text {Ci}\left (d x^3\right )+\frac {1}{3} b^2 d \text {Ci}\left (2 d x^3\right ) \sin (2 c)-\frac {2 a b \sin \left (c+d x^3\right )}{3 x^3}-\frac {2}{3} a b d \sin (c) \text {Si}\left (d x^3\right )+\frac {1}{3} b^2 d \cos (2 c) \text {Si}\left (2 d x^3\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.16, size = 116, normalized size = 0.95 \begin {gather*} \frac {-2 a^2-b^2+b^2 \cos \left (2 \left (c+d x^3\right )\right )+4 a b d x^3 \cos (c) \text {Ci}\left (d x^3\right )+2 b^2 d x^3 \text {Ci}\left (2 d x^3\right ) \sin (2 c)-4 a b \sin \left (c+d x^3\right )-4 a b d x^3 \sin (c) \text {Si}\left (d x^3\right )+2 b^2 d x^3 \cos (2 c) \text {Si}\left (2 d x^3\right )}{6 x^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.19, size = 0, normalized size = 0.00 \[\int \frac {\left (a +b \sin \left (d \,x^{3}+c \right )\right )^{2}}{x^{4}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains complex when optimal does not.
time = 0.41, size = 124, normalized size = 1.02 \begin {gather*} \frac {1}{3} \, {\left ({\left (\Gamma \left (-1, i \, d x^{3}\right ) + \Gamma \left (-1, -i \, d x^{3}\right )\right )} \cos \left (c\right ) - {\left (i \, \Gamma \left (-1, i \, d x^{3}\right ) - i \, \Gamma \left (-1, -i \, d x^{3}\right )\right )} \sin \left (c\right )\right )} a b d + \frac {{\left ({\left ({\left (i \, \Gamma \left (-1, 2 i \, d x^{3}\right ) - i \, \Gamma \left (-1, -2 i \, d x^{3}\right )\right )} \cos \left (2 \, c\right ) + {\left (\Gamma \left (-1, 2 i \, d x^{3}\right ) + \Gamma \left (-1, -2 i \, d x^{3}\right )\right )} \sin \left (2 \, c\right )\right )} d x^{3} - 1\right )} b^{2}}{6 \, x^{3}} - \frac {a^{2}}{3 \, x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 147, normalized size = 1.20 \begin {gather*} \frac {2 \, b^{2} d x^{3} \cos \left (2 \, c\right ) \operatorname {Si}\left (2 \, d x^{3}\right ) - 4 \, a b d x^{3} \sin \left (c\right ) \operatorname {Si}\left (d x^{3}\right ) + 2 \, b^{2} \cos \left (d x^{3} + c\right )^{2} - 4 \, a b \sin \left (d x^{3} + c\right ) - 2 \, a^{2} - 2 \, b^{2} + 2 \, {\left (a b d x^{3} \operatorname {Ci}\left (d x^{3}\right ) + a b d x^{3} \operatorname {Ci}\left (-d x^{3}\right )\right )} \cos \left (c\right ) + {\left (b^{2} d x^{3} \operatorname {Ci}\left (2 \, d x^{3}\right ) + b^{2} d x^{3} \operatorname {Ci}\left (-2 \, d x^{3}\right )\right )} \sin \left (2 \, c\right )}{6 \, x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \sin {\left (c + d x^{3} \right )}\right )^{2}}{x^{4}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 226 vs.
\(2 (109) = 218\).
time = 5.30, size = 226, normalized size = 1.85 \begin {gather*} \frac {4 \, {\left (d x^{3} + c\right )} a b d^{2} \cos \left (c\right ) \operatorname {Ci}\left (d x^{3}\right ) - 4 \, a b c d^{2} \cos \left (c\right ) \operatorname {Ci}\left (d x^{3}\right ) + 2 \, {\left (d x^{3} + c\right )} b^{2} d^{2} \operatorname {Ci}\left (2 \, d x^{3}\right ) \sin \left (2 \, c\right ) - 2 \, b^{2} c d^{2} \operatorname {Ci}\left (2 \, d x^{3}\right ) \sin \left (2 \, c\right ) - 4 \, {\left (d x^{3} + c\right )} a b d^{2} \sin \left (c\right ) \operatorname {Si}\left (d x^{3}\right ) + 4 \, a b c d^{2} \sin \left (c\right ) \operatorname {Si}\left (d x^{3}\right ) - 2 \, {\left (d x^{3} + c\right )} b^{2} d^{2} \cos \left (2 \, c\right ) \operatorname {Si}\left (-2 \, d x^{3}\right ) + 2 \, b^{2} c d^{2} \cos \left (2 \, c\right ) \operatorname {Si}\left (-2 \, d x^{3}\right ) + b^{2} d^{2} \cos \left (2 \, d x^{3} + 2 \, c\right ) - 4 \, a b d^{2} \sin \left (d x^{3} + c\right ) - 2 \, a^{2} d^{2} - b^{2} d^{2}}{6 \, d^{2} x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+b\,\sin \left (d\,x^3+c\right )\right )}^2}{x^4} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________